Micron Document
<!DOCTYPE html>
<html class="client-nojs vector-feature-night-mode-disabled vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-sticky-header-enabled" lang="en" dir="ltr"><head>
<meta charset="UTF-8">
<title>Class (computer programming)</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="https://en.wikipedia.org/wiki/Class_(computer_programming)"> <link href="./mw/ext.cite.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/ext.pygments.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.icons.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.search.codex.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/user.styles.css" rel="stylesheet" type="text/css">
<meta name="ResourceLoaderDynamicStyles" content="">
<link rel="stylesheet" type="text/css" href="./mw/site.styles.css">
<link rel="stylesheet" type="text/css" href="./mw/noscript.css">
<link rel="stylesheet" type="text/css" href="./footer.css">
<link rel="stylesheet" type="text/css" href="./vector-2022.css">
</head>
<body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject page-Class_computer_programming rootpage-Class_computer_programming skin-vector-2022 action-view">
<div class="mw-page-container">
<div class="mw-page-container-inner">
<div class="mw-content-container">
<main id="content" class="mw-body">
<header class="mw-body-header vector-page-titlebar">
<h1 id="firstHeading" class="firstHeading mw-first-heading">
<span id="openzim-page-title" class="mw-page-title-main"><span class="mw-page-title-main">Class (computer programming)</span></span>
</h1>
</header>
<a id="top"></a>
<div id="bodyContent" class="vector-body ve-init-mw-desktopArticleTarget-targetContainer" aria-labelledby="firstHeading" data-mw-ve-target-container="">
<div id="mw-content-text" class="mw-body-content mw-content-ltr" lang="en" dir="ltr"><div class="mw-content-ltr mw-parser-output" lang="en" dir="ltr">
<p>In <a href="Object-oriented_programming" title="Object-oriented programming">object-oriented programming</a>, a <b>class</b> defines the shared aspects of <a href="Object_(computer_science)" title="Object (computer science)">objects</a> created from the class. The capabilities of a class differ between <a href="Programming_language" title="Programming language">programming languages</a>, but generally the shared aspects consist of state (<a href="Variable_(computer_science)" title="Variable (computer science)">variables</a>) and behavior (<a href="Method_(computer_programming)" title="Method (computer programming)">methods</a>) that are each either associated with a particular object or with all objects of that class.<sup id="cite_ref-FOOTNOTEGammaHelmJohnsonVlissides199514_1-0" class="reference"><a href="#cite_note-FOOTNOTEGammaHelmJohnsonVlissides199514-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-FOOTNOTEBruce20022.1_Objects,_classes,_and_object_types,_https://books.google.com/books?id=9NGWq3K1RwUC&amp;pg=PA18_2-0" class="reference"><a href="#cite_note-FOOTNOTEBruce20022.1_Objects,_classes,_and_object_types,_https://books.google.com/books?id=9NGWq3K1RwUC&amp;pg=PA18-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup>
</p><p>Object state can differ between each instance of the class whereas the class state is shared by all of them. The object methods include access to the object state (via an implicit or explicit parameter that references the object) whereas class methods do not.
</p><p>If the language supports <a href="Inheritance_(object-oriented_programming)" title="Inheritance (object-oriented programming)">inheritance</a>, a class can be defined based on another class with all of its state and behavior plus additional state and behavior that further specializes the class. The specialized class is a <i>sub-class</i>, and the class it is based on is its <i>superclass</i>.
</p>
<meta property="mw:PageProp/toc">
<div class="mw-heading mw-heading2"><h2 id="Attributes">Attributes</h2></div>
<div class="mw-heading mw-heading3"><h3 id="Object_lifecycle">Object lifecycle</h3></div>
<p>As an <a href="Instance_(computer_science)" title="Instance (computer science)">instance</a> of a class, an object is constructed from a class via <i>instantiation</i>. Memory is allocated and initialized for the object state and a <a href="Reference_(computer_science)" title="Reference (computer science)">reference</a> to the object is provided to consuming code. The object is usable until it is destroyed – its state memory is de-allocated.
</p><p>Most languages allow for custom logic at lifecycle events via a <a href="Constructor_(object-oriented_programming)" title="Constructor (object-oriented programming)">constructor</a> and a <a href="Destructor_(computer_programming)" title="Destructor (computer programming)">destructor</a>.
</p>
<div class="mw-heading mw-heading3"><h3 id="Type">Type</h3></div>
<p>An object expresses <a href="Data_type" title="Data type">data type</a> as an interface – the type of each member variable and the signature of each <a href="Member_function" class="mw-redirect" title="Member function">member function</a> (method). A class defines an implementation of an interface, and instantiating the class results in an object that exposes the implementation via the interface.<sup id="cite_ref-FOOTNOTEGammaHelmJohnsonVlissides199517_3-0" class="reference"><a href="#cite_note-FOOTNOTEGammaHelmJohnsonVlissides199517-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup> In the terms of type theory, a class is an implementation‍—‌a <i>concrete</i> <a href="Data_structure" title="Data structure">data structure</a> and collection of subroutines‍—‌while a type is an <a href="Protocol_(object-oriented_programming)" class="mw-redirect" title="Protocol (object-oriented programming)">interface</a>. Different (concrete) classes can produce objects of the same (abstract) type (depending on type system). For example, the type (interface) <style data-mw-deduplicate="TemplateStyles:r886049734">
/* start https://en.wikipedia.org/ */


.mw-parser-output .monospaced{font-family:monospace,monospace}


/* end https://en.wikipedia.org/ */
</style><span class="monospaced">Stack</span> might be implemented by <span class="monospaced">SmallStack</span> that is fast for small stacks but scales poorly and <span class="monospaced">ScalableStack</span> that scales well but has high overhead for small stacks.
</p>
<div class="mw-heading mw-heading3"><h3 id="Structure">Structure</h3></div>

<p>A class contains <a href="Data_(computing)" class="mw-redirect" title="Data (computing)">data</a> <a href="Field_(computer_science)" title="Field (computer science)">field</a> descriptions (or <i><a href="Property_(programming)" title="Property (programming)">properties</a></i>, <i><a href="Field_(computer_science)" title="Field (computer science)">fields</a></i>, <i>data <a href="Member_variable" title="Member variable">members</a></i>, or <i><a href="Attribute_(computing)" title="Attribute (computing)">attributes</a></i>). These are usually field types and names that will be associated with state variables at program run time; these state variables either belong to the class or specific instances of the class. In most languages, the structure defined by the class determines the layout of the memory used by its instances. Other implementations are possible: for example, objects in <a href="Python_(programming_language)" title="Python (programming language)">Python</a> use associative key-value containers.<sup id="cite_ref-pythondata_model_4-0" class="reference"><a href="#cite_note-pythondata_model-4"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup>
</p><p>Some programming languages such as Eiffel support specification of <a href="Class_invariant" title="Class invariant">invariants</a> as part of the definition of the class, and enforce them through the type system. <a href="Encapsulation_(object-oriented_programming)" class="mw-redirect" title="Encapsulation (object-oriented programming)">Encapsulation</a> of state is necessary for being able to enforce the invariants of the class.
</p>
<div class="mw-heading mw-heading3"><h3 id="Behavior">Behavior</h3></div>
<style data-mw-deduplicate="TemplateStyles:r1236090951">
/* start https://en.wikipedia.org/ */


.mw-parser-output .hatnote{font-style:italic}.mw-parser-output div.hatnote{padding-left:1.6em;margin-bottom:0.5em}.mw-parser-output .hatnote i{font-style:normal}.mw-parser-output .hatnote+link+.hatnote{margin-top:-0.5em}@media print{body.ns-0 .mw-parser-output .hatnote{display:none!important}}


/* end https://en.wikipedia.org/ */
</style><div role="note" class="hatnote navigation-not-searchable">Main article: <a href="Method_(computer_programming)" title="Method (computer programming)">Method (computer programming)</a></div>
<p>The behavior of a class or its instances is defined using <a href="Method_(computer_programming)" title="Method (computer programming)">methods</a>. Methods are <a href="Subroutine" class="mw-redirect" title="Subroutine">subroutines</a> with the ability to operate on objects or classes. These operations may alter the state of an object or simply provide ways of accessing it.<sup id="cite_ref-FOOTNOTEBooch199486-88_5-0" class="reference"><a href="#cite_note-FOOTNOTEBooch199486-88-5"><span class="cite-bracket">[</span>5<span class="cite-bracket">]</span></a></sup> Many kinds of methods exist, but support for them varies across languages. Some types of methods are created and called by programmer code, while other special methods—such as constructors, destructors, and conversion operators—are created and called by compiler-generated code. A language may also allow the programmer to define and call these special methods.<sup id="cite_ref-6" class="reference"><a href="#cite_note-6"><span class="cite-bracket">[</span>6<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-7" class="reference"><a href="#cite_note-7"><span class="cite-bracket">[</span>7<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading3"><h3 id="Class_interface">Class interface</h3></div>
<div role="note" class="hatnote navigation-not-searchable">Main article: <a href="Interface_(object-oriented_programming)" title="Interface (object-oriented programming)">Interface (object-oriented programming)</a></div>
<div role="note" class="hatnote navigation-not-searchable">Further information: <a href="Interface_(computing)" title="Interface (computing)">Interface (computing)</a></div>
<p>Every class <i>implements</i> (or <i>realizes</i>) an interface by providing <a href="#Structure">structure</a> and behavior. Structure consists of data and state, and behavior consists of code that specifies how methods are implemented.<sup id="cite_ref-FOOTNOTEBooch1994105_8-0" class="reference"><a href="#cite_note-FOOTNOTEBooch1994105-8"><span class="cite-bracket">[</span>8<span class="cite-bracket">]</span></a></sup> There is a distinction between the definition of an interface and the implementation of that interface; however, this line is blurred in many programming languages because class declarations both define and implement an interface. Some languages, however, provide features that separate interface and implementation. For example, an <a href="#Abstract_and_Concrete">abstract class</a> can define an interface without providing an implementation.
</p><p>Languages that support class inheritance also allow classes to inherit interfaces from the classes that they are derived from.
</p><p>For example, if "class A" inherits from "class B" and if "class B" implements the interface "interface B" then "class A" also inherits the functionality(constants and methods declaration) provided by "interface B".
</p><p>In languages that support <a href="#Information_hiding_and_encapsulation">access specifiers</a>, the interface of a class is considered to be the set of public members of the class, including both methods and attributes (via implicit <a href="Mutator_method" title="Mutator method">getter and setter methods</a>); any private members or internal data structures are not intended to be depended on by external code and thus are not part of the interface.
</p><p>Object-oriented programming methodology dictates that the operations of any interface of a class are to be independent of each other. It results in a layered design where clients of an interface use the methods declared in the interface. An interface places no requirements for clients to invoke the operations of one interface in any particular order. This approach has the benefit that client code can assume that the operations of an interface are available for use whenever the client has access to the object.<sup id="cite_ref-9" class="reference"><a href="#cite_note-9"><span class="cite-bracket">[</span>9<span class="cite-bracket">]</span></a></sup>
</p>
<dl><dt>Class interface example</dt></dl>
<p>The buttons on the front of your television set are the interface between you and the electrical wiring on the other side of its plastic casing. You press the "power" button to toggle the television on and off. In this example, your particular television is the instance, each method is represented by a button, and all the buttons together compose the interface (other television sets that are the same model as yours would have the same interface). In its most common form, an interface is a specification of a group of related methods without any associated implementation of the methods.
</p><p>A television set also has a myriad of <i>attributes</i>, such as size and whether it supports color, which together comprise its structure. A class represents the full description of a television, including its attributes (structure) and buttons (interface).
</p><p>Getting the total number of televisions manufactured could be a <i>static method</i> of the television class. This method is associated with the class, yet is outside the domain of each instance of the class. A static method that finds a particular instance out of the set of all television objects is another example.
</p>
<div class="mw-heading mw-heading3"><h3 id="Member_accessibility">Member accessibility</h3></div>
<div role="note" class="hatnote navigation-not-searchable">"Private member" redirects here. For other uses, see <a href="Private_members_club" class="mw-redirect" title="Private members club">Private members club</a> and <a href="Private_member's_bill" title="Private member's bill">Private member's bill</a>.</div>
<div role="note" class="hatnote navigation-not-searchable">Further information: <a href="Information_hiding" title="Information hiding">Information hiding</a></div>
<p>The following is a common set of <a href="Access_specifiers" class="mw-redirect" title="Access specifiers">access specifiers</a>:<sup id="cite_ref-JavaAccessControl_10-0" class="reference"><a href="#cite_note-JavaAccessControl-10"><span class="cite-bracket">[</span>10<span class="cite-bracket">]</span></a></sup>
</p>
<ul><li><i>Private</i> (or <i>class-private</i>) restricts access to the class itself. Only methods that are part of the same class can access private members.</li>
<li><i>Protected</i> (or <i>class-protected</i>) allows the class itself and all its subclasses to access the member.</li>
<li><i>Public</i> means that any code can access the member by its name.</li></ul>
<p>Although many object-oriented languages support the above access specifiers, their semantics may differ.
</p><p>Object-oriented design uses the access specifiers in conjunction with careful design of public method implementations to enforce class invariants—constraints on the state of the objects. A common usage of access specifiers is to separate the internal data of a class from its interface: the internal structure is made private, while public <a href="Accessor_method" class="mw-redirect" title="Accessor method">accessor methods</a> can be used to inspect or alter such private data.
</p><p>Access specifiers do not necessarily control <i>visibility</i>, in that even private members may be visible to client external code. In some languages, an inaccessible but visible member may be referred to at runtime (for example, by a pointer returned from a member function), but an attempt to use it by referring to the name of the member from the client code will be prevented by the type checker.<sup id="cite_ref-11" class="reference"><a href="#cite_note-11"><span class="cite-bracket">[</span>11<span class="cite-bracket">]</span></a></sup>
</p><p>The various object-oriented programming languages enforce member accessibility and visibility to various degrees, and depending on the language's <a href="Type_system" title="Type system">type system</a> and compilation policies, enforced at either <a href="Compile_time" title="Compile time">compile time</a> or <a href="Runtime_(program_lifecycle_phase)" class="mw-redirect" title="Runtime (program lifecycle phase)">runtime</a>. For example, the <a href="Java_(programming_language)" title="Java (programming language)">Java</a> language does not allow client code that accesses the private data of a class to compile.<sup id="cite_ref-12" class="reference"><a href="#cite_note-12"><span class="cite-bracket">[</span>12<span class="cite-bracket">]</span></a></sup> In the <a href="C%2B%2B" title="C++">C++</a> language, private methods are visible, but not accessible in the interface; however, they may be made invisible by explicitly declaring fully abstract classes that represent the interfaces of the class.<sup id="cite_ref-cppinterface_13-0" class="reference"><a href="#cite_note-cppinterface-13"><span class="cite-bracket">[</span>13<span class="cite-bracket">]</span></a></sup>
</p><p>Some languages feature other accessibility schemes:
</p>
<ul><li><i>Instance vs. class accessibility</i>: <a href="Ruby_(programming_language)" title="Ruby (programming language)">Ruby</a> supports <i>instance-private</i> and <i>instance-protected</i> access specifiers in lieu of class-private and class-protected, respectively. They differ in that they restrict access based on the instance itself, rather than the instance's class.<sup id="cite_ref-14" class="reference"><a href="#cite_note-14"><span class="cite-bracket">[</span>14<span class="cite-bracket">]</span></a></sup></li>
<li><i>Friend</i>: C++ supports a mechanism where a function explicitly declared as a <a href="Friend_function" title="Friend function">friend function</a> of the class may access the members designated as private or protected.<sup id="cite_ref-15" class="reference"><a href="#cite_note-15"><span class="cite-bracket">[</span>15<span class="cite-bracket">]</span></a></sup></li>
<li><i>Path-based</i>: Java supports restricting access to a member within a <a href="Java_syntax#Access_modifiers" title="Java syntax">Java package</a>, which is the logical path of the file. However, it is a common practice when extending a Java framework to implement classes in the same package as a framework class to access protected members. The source file may exist in a completely different location, and may be deployed to a different .jar file, yet still be in the same logical path as far as the JVM is concerned.<sup id="cite_ref-JavaAccessControl_10-1" class="reference"><a href="#cite_note-JavaAccessControl-10"><span class="cite-bracket">[</span>10<span class="cite-bracket">]</span></a></sup></li></ul>
<div class="mw-heading mw-heading4"><h4 id="Inheritance">Inheritance</h4></div>
<div role="note" class="hatnote navigation-not-searchable">Main articles: <a href="Inheritance_(object-oriented_programming)" title="Inheritance (object-oriented programming)">Inheritance (object-oriented programming)</a>, <a href="Superclass_(computer_science)" class="mw-redirect" title="Superclass (computer science)">Superclass (computer science)</a>, and <a href="Subclass_(computer_science)" class="mw-redirect" title="Subclass (computer science)">Subclass (computer science)</a></div>
<p>Conceptually, a superclass is a <a href="Superset" class="mw-redirect" title="Superset">superset</a> of its subclasses. For example, <span class="monospaced">GraphicObject</span> could be a superclass of <span class="monospaced">Rectangle</span> and <span class="monospaced">Ellipse</span>, while <span class="monospaced">Square</span> would be a subclass of <span class="monospaced">Rectangle</span>. These are all <a href="Subset" title="Subset">subset relations</a> in set theory as well, i.e., all squares are rectangles but not all rectangles are squares.
</p><p>A common conceptual error is to mistake a <i>part of</i> relation with a subclass. For example, a car and truck are both kinds of vehicles and it would be appropriate to model them as subclasses of a vehicle class. However, it would be an error to model the parts of the car as subclass relations. For example, a car is composed of an engine and body, but it would not be appropriate to model an engine or body as a subclass of a car.
</p><p>In <a href="Object-oriented_modeling" title="Object-oriented modeling">object-oriented modeling</a> these kinds of relations are typically modeled as object properties. In this example, the <span class="monospaced">Car</span> class would have a property called <span class="monospaced">parts</span>. <span class="monospaced">parts</span> would be typed to hold a collection of objects, such as instances of <span class="monospaced">Body</span>, <span class="monospaced">Engine</span>, <span class="monospaced">Tires</span>, etc.
Object modeling languages such as <a href="Unified_Modeling_Language" title="Unified Modeling Language">UML</a> include capabilities to model various aspects of "part of" and other kinds of relations – data such as the cardinality of the objects, constraints on input and output values, etc. This information can be utilized by developer tools to generate additional code besides the basic data definitions for the objects, such as error checking on <a href="Mutator_method" title="Mutator method">get and set methods</a>.<sup id="cite_ref-16" class="reference"><a href="#cite_note-16"><span class="cite-bracket">[</span>16<span class="cite-bracket">]</span></a></sup>
</p><p>One important question when modeling and implementing a system of object classes is whether a class can have one or more superclasses. In the real world with actual sets, it would be rare to find sets that did not intersect with more than one other set. However, while some systems such as Flavors and CLOS provide a capability for more than one parent to do so at run time introduces complexity that many in the object-oriented community consider antithetical to the goals of using object classes in the first place. Understanding which class will be responsible for handling a message can get complex when dealing with more than one superclass. If used carelessly this feature can introduce some of the same system complexity and ambiguity classes were designed to avoid.<sup id="cite_ref-17" class="reference"><a href="#cite_note-17"><span class="cite-bracket">[</span>17<span class="cite-bracket">]</span></a></sup>
</p><p>Most modern object-oriented languages such as Smalltalk and Java require single inheritance at run time. For these languages, multiple inheritance may be useful for modeling but not for an implementation.
</p><p>However, <a href="Semantic_web" class="mw-redirect" title="Semantic web">semantic web</a> application objects do have multiple superclasses. The volatility of the Internet requires this level of flexibility and the technology standards such as the <a href="Web_Ontology_Language" title="Web Ontology Language">Web Ontology Language (OWL)</a> are designed to support it.
</p><p>A similar issue is whether or not the class hierarchy can be modified at run time. Languages such as Flavors, CLOS, and Smalltalk all support this feature as part of their <a href="Meta-object_protocol" class="mw-redirect" title="Meta-object protocol">meta-object protocols</a>. Since classes are themselves first-class objects, it is possible to have them dynamically alter their structure by sending them the appropriate messages. Other languages that focus more on strong typing such as Java and C++ do not allow the class hierarchy to be modified at run time. Semantic web objects have the capability for run time changes to classes. The rationale is similar to the justification for allowing multiple superclasses, that the Internet is so dynamic and flexible that dynamic changes to the hierarchy are required to manage this volatility.<sup id="cite_ref-18" class="reference"><a href="#cite_note-18"><span class="cite-bracket">[</span>18<span class="cite-bracket">]</span></a></sup>
</p><p>Although many class-based languages support inheritance, inheritance is not an intrinsic aspect of classes. An <a href="Object-based_language" title="Object-based language">object-based language</a> (i.e. <a href="Classic_Visual_Basic" class="mw-redirect" title="Classic Visual Basic">Classic Visual Basic</a>) supports classes yet does not support inheritance.
</p>
<div class="mw-heading mw-heading3"><h3 id="Local_and_inner">Local and inner</h3></div>
<p>In some languages, classes can be declared in <a href="Scope_(programming)" class="mw-redirect" title="Scope (programming)">scopes</a> other than the global scope. There are various types of such classes.
</p><p>An <i><a href="Inner_class" title="Inner class">inner class</a></i> is a class defined within another class. The relationship between an inner class and its containing class can also be treated as another type of class association. An inner class is typically neither associated with instances of the enclosing class nor instantiated along with its enclosing class. Depending on the language, it may or may not be possible to refer to the class from outside the enclosing class. A related concept is <i>inner types</i>, also known as <i>inner data type</i> or <i>nested type</i>, which is a generalization of the concept of inner classes. <a href="C%2B%2B" title="C++">C++</a> is an example of a language that supports both inner classes and inner types (via <i><a href="Typedef" title="Typedef">typedef</a></i> declarations).<sup id="cite_ref-19" class="reference"><a href="#cite_note-19"><span class="cite-bracket">[</span>19<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-20" class="reference"><a href="#cite_note-20"><span class="cite-bracket">[</span>20<span class="cite-bracket">]</span></a></sup>
</p><p>A <i>local class</i> is a class defined within a procedure or function. Such structure limits references to the class name to within the scope where the class is declared. Depending on the semantic rules of the language, there may be additional restrictions on local classes compared to non-local ones. One common restriction is to disallow local class methods to access local variables of the enclosing function. For example, in C++, a local class may refer to <a href="Static_variable" title="Static variable">static variables</a> declared within its enclosing function, but may not access the function's <a href="Automatic_variable" title="Automatic variable">automatic variables</a>.<sup id="cite_ref-21" class="reference"><a href="#cite_note-21"><span class="cite-bracket">[</span>21<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading3"><h3 id="Metaclass">Metaclass</h3></div>
<div role="note" class="hatnote navigation-not-searchable">Main article: <a href="Metaclass" title="Metaclass">Metaclass</a></div>
<p>A metaclass is a class where instances are classes.<sup id="cite_ref-FOOTNOTEBooch1994133-134_22-0" class="reference"><a href="#cite_note-FOOTNOTEBooch1994133-134-22"><span class="cite-bracket">[</span>22<span class="cite-bracket">]</span></a></sup> A metaclass describes a common structure of a collection of classes and can implement a <a href="Design_pattern_(computer_science)" class="mw-redirect" title="Design pattern (computer science)">design pattern</a> or describe particular kinds of classes. Metaclasses are often used to describe <a href="Software_framework" title="Software framework">frameworks</a>.<sup id="cite_ref-23" class="reference"><a href="#cite_note-23"><span class="cite-bracket">[</span>23<span class="cite-bracket">]</span></a></sup>
</p><p>In some languages, such as <a href="Python_(programming_language)" title="Python (programming language)">Python</a>, <a href="Ruby_(programming_language)" title="Ruby (programming language)">Ruby</a> or <a href="Smalltalk" title="Smalltalk">Smalltalk</a>, a class is also an object; thus each class is an instance of a unique metaclass that is built into the language.<sup id="cite_ref-pythondata_model_4-1" class="reference"><a href="#cite_note-pythondata_model-4"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-24" class="reference"><a href="#cite_note-24"><span class="cite-bracket">[</span>24<span class="cite-bracket">]</span></a></sup>
<sup id="cite_ref-FOOTNOTEBooch1994134_25-0" class="reference"><a href="#cite_note-FOOTNOTEBooch1994134-25"><span class="cite-bracket">[</span>25<span class="cite-bracket">]</span></a></sup>
The <a href="Common_Lisp_Object_System" title="Common Lisp Object System">Common Lisp Object System</a> (CLOS) provides <a href="Metaobject" title="Metaobject">metaobject protocols</a> (MOPs) to implement those classes and metaclasses.<sup id="cite_ref-26" class="reference"><a href="#cite_note-26"><span class="cite-bracket">[</span>26<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading3"><h3 id="Sealed">Sealed</h3></div>
<p>
A sealed class cannot be subclassed. It is basically the opposite of an <i>abstract</i> class, which must be derived to be used. A sealed class is implicitly <i>concrete</i>.
</p><p>A class is declared as sealed via the keyword <code class="mw-highlight mw-highlight-lang-csharp mw-content-ltr" style="" dir="ltr"><span class="k">sealed</span></code> in C# or <code class="mw-highlight mw-highlight-lang-java mw-content-ltr" style="" dir="ltr"><span class="kd">final</span></code> in Java or PHP. However, this concept should not be confused with classes in Java qualified with the keyword <code>sealed</code>, that only allow inheritance from selected subclasses.<sup id="cite_ref-27" class="reference"><a href="#cite_note-27"><span class="cite-bracket">[</span>27<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-28" class="reference"><a href="#cite_note-28"><span class="cite-bracket">[</span>28<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-29" class="reference"><a href="#cite_note-29"><span class="cite-bracket">[</span>29<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-30" class="reference"><a href="#cite_note-30"><span class="cite-bracket">[</span>30<span class="cite-bracket">]</span></a></sup>
</p><p>For example, Java's <code class="mw-highlight mw-highlight-lang-java mw-content-ltr" dir="ltr"><span class="n">String</span></code> class is marked as <i>final</i>.<sup id="cite_ref-31" class="reference"><a href="#cite_note-31"><span class="cite-bracket">[</span>31<span class="cite-bracket">]</span></a></sup>
</p><p>Sealed classes may allow a compiler to perform optimizations that are not available for classes that can be subclassed.<sup id="cite_ref-32" class="reference"><a href="#cite_note-32"><span class="cite-bracket">[</span>32<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading3"><h3 id="Open">Open</h3></div>
<p>An open class can be changed. Typically, an <a href="Executable_program" class="mw-redirect" title="Executable program">executable program</a> cannot be changed by customers. Developers can often change some classes, but typically cannot change standard or built-in ones. In <a href="Ruby_(programming_language)#Open_classes" title="Ruby (programming language)">Ruby</a>, all classes are open. In <a href="Python_(programming_language)" title="Python (programming language)">Python</a>, classes can be created at runtime, and all can be modified afterward.<sup id="cite_ref-33" class="reference"><a href="#cite_note-33"><span class="cite-bracket">[</span>33<span class="cite-bracket">]</span></a></sup> <a href="Objective-C#Categories" title="Objective-C">Objective-C categories</a> permit the programmer to add methods to an existing class without the need to recompile that class or even have access to its source code.
</p>
<div class="mw-heading mw-heading3"><h3 id="Mixin">Mixin</h3></div>
<p>Some languages have special support for <a href="Mixin" title="Mixin">mixins</a>, though, in any language with multiple inheritance, a mixin is simply a class that does not represent an is-a-type-of relationship. Mixins are typically used to add the same methods to multiple classes; for example, a class <span class="monospaced">UnicodeConversionMixin</span> might provide a method called <span class="monospaced">unicode_to_ascii</span> when included in classes <span class="monospaced">FileReader</span> and <span class="monospaced">WebPageScraper</span> that do not share a common parent.
</p>
<div class="mw-heading mw-heading3"><h3 id="Partial">Partial</h3></div>
<p>In languages supporting the feature, a <i>partial class</i> is a class whose definition may be split into multiple pieces, within a single <a href="Source_code" title="Source code">source-code</a> file or across multiple files.<sup id="cite_ref-mspartial_34-0" class="reference"><a href="#cite_note-mspartial-34"><span class="cite-bracket">[</span>34<span class="cite-bracket">]</span></a></sup> The pieces are merged at compile time, making compiler output the same as for a non-partial class.
</p><p>The primary motivation for the introduction of partial classes is to facilitate the implementation of <a href="Automatic_programming" title="Automatic programming">code generators</a>, such as <a href="Visual_designer" class="mw-redirect" title="Visual designer">visual designers</a>.<sup id="cite_ref-mspartial_34-1" class="reference"><a href="#cite_note-mspartial-34"><span class="cite-bracket">[</span>34<span class="cite-bracket">]</span></a></sup> It is otherwise a challenge or compromise to develop code generators that can manage the generated code when it is interleaved within developer-written code. Using partial classes, a code generator can process a separate file or coarse-grained partial class within a file, and is thus alleviated from intricately interjecting generated code via extensive parsing, increasing compiler efficiency and eliminating the potential risk of corrupting developer code. In a simple implementation of partial classes, the compiler can perform a phase of <a href="Precompilation" class="mw-redirect" title="Precompilation">precompilation</a> where it "unifies" all the parts of a partial class. Then, compilation can proceed as usual. <sup id="cite_ref-35" class="reference"><a href="#cite_note-35"><span class="cite-bracket">[</span>35<span class="cite-bracket">]</span></a></sup>
</p><p>Other benefits and effects of the partial class feature include:
</p>
<ul><li>Enables separation of a class's interface and implementation code in a unique way.</li>
<li>Eases navigation through large classes within an <a href="Source_code_editor" class="mw-redirect" title="Source code editor">editor</a>.</li>
<li>Enables <a href="Separation_of_concerns" title="Separation of concerns">separation of concerns</a>, in a way similar to <a href="Aspect-oriented_programming" title="Aspect-oriented programming">aspect-oriented programming</a> but without using any extra tools.</li>
<li>Enables multiple developers to work on a single class concurrently without the need to merge individual code into one file at a later time.</li></ul>
<p>Partial classes have existed in <a href="Smalltalk" title="Smalltalk">Smalltalk</a> under the name of <i>Class Extensions</i> for considerable time. With the arrival of the <a href=".NET_Framework" title=".NET Framework">.NET framework 2</a>, <a href="Microsoft" title="Microsoft">Microsoft</a> introduced partial classes, supported in both <a href="C_Sharp_(programming_language)" title="C Sharp (programming language)">C#</a> 2.0 and <a href="Visual_Basic_.NET" class="mw-redirect" title="Visual Basic .NET">Visual Basic 2005</a>. <a href="WinRT" class="mw-redirect" title="WinRT">WinRT</a> also supports partial classes. <sup id="cite_ref-36" class="reference"><a href="#cite_note-36"><span class="cite-bracket">[</span>36<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading3"><h3 id="Uninstantiable">Uninstantiable</h3></div>
<p><i>Uninstantiable classes</i> allow programmers to group together per-class fields and methods that are accessible at runtime without an instance of the class. Indeed, instantiation is prohibited for this kind of class.
</p><p>For example, in C#, a class marked "static" can not be instantiated, can only have static members (fields, methods, other), may not have <i>instance constructors</i>, and is <i>sealed</i>.
<sup id="cite_ref-37" class="reference"><a href="#cite_note-37"><span class="cite-bracket">[</span>37<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading3"><h3 id="Unnamed">Unnamed</h3></div>
<p>An <i>unnamed class</i> or <i>anonymous class</i> is not bound to a name or identifier upon definition.<sup id="cite_ref-38" class="reference"><a href="#cite_note-38"><span class="cite-bracket">[</span>38<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-39" class="reference"><a href="#cite_note-39"><span class="cite-bracket">[</span>39<span class="cite-bracket">]</span></a></sup> This is analogous to named versus <a href="Anonymous_function" title="Anonymous function">unnamed functions</a>.
</p>
<div class="mw-heading mw-heading2"><h2 id="Benefits">Benefits</h2></div>
<p>The benefits of organizing software into object classes fall into three categories:<sup id="cite_ref-40" class="reference"><a href="#cite_note-40"><span class="cite-bracket">[</span>40<span class="cite-bracket">]</span></a></sup>
</p>
<ul><li>Rapid development</li>
<li>Ease of maintenance</li>
<li>Reuse of code and designs</li></ul>
<p>Object classes facilitate rapid development because they lessen the semantic gap between the code and the users. System analysts can talk to both developers and users using essentially the same vocabulary, talking about accounts, customers, bills, etc. Object classes often facilitate rapid development because most object-oriented environments come with powerful debugging and testing tools. Instances of classes can be inspected at run time to verify that the system is performing as expected. Also, rather than get dumps of core memory, most object-oriented environments have interpreted debugging capabilities so that the developer can analyze exactly where in the program the error occurred and can see which methods were called to which arguments and with what arguments.<sup id="cite_ref-41" class="reference"><a href="#cite_note-41"><span class="cite-bracket">[</span>41<span class="cite-bracket">]</span></a></sup>
</p><p>Object classes facilitate ease of maintenance via encapsulation. When developers need to change the behavior of an object they can localize the change to just that object and its component parts. This reduces the potential for unwanted side effects from maintenance enhancements.
</p><p>Software reuse is also a major benefit of using Object classes. Classes facilitate re-use via inheritance and interfaces. When a new behavior is required it can often be achieved by creating a new class and having that class inherit the default behaviors and data of its superclass and then tailoring some aspect of the behavior or data accordingly. Re-use via interfaces (also known as methods) occurs when another object wants to invoke (rather than create a new kind of) some object class. This method for re-use removes many of the common errors that can make their way into software when one program re-uses code from another.<sup id="cite_ref-42" class="reference"><a href="#cite_note-42"><span class="cite-bracket">[</span>42<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading2"><h2 id="Runtime_representation">Runtime representation</h2></div>
<style data-mw-deduplicate="TemplateStyles:r1251242444">
/* start https://en.wikipedia.org/ */


.mw-parser-output .ambox{border:1px solid #a2a9b1;border-left:10px solid #36c;background-color:#fbfbfb;box-sizing:border-box}.mw-parser-output .ambox+link+.ambox,.mw-parser-output .ambox+link+style+.ambox,.mw-parser-output .ambox+link+link+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+style+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+link+.ambox{margin-top:-1px}html body.mediawiki .mw-parser-output .ambox.mbox-small-left{margin:4px 1em 4px 0;overflow:hidden;width:238px;border-collapse:collapse;font-size:88%;line-height:1.25em}.mw-parser-output .ambox-speedy{border-left:10px solid #b32424;background-color:#fee7e6}.mw-parser-output .ambox-delete{border-left:10px solid #b32424}.mw-parser-output .ambox-content{border-left:10px solid #f28500}.mw-parser-output .ambox-style{border-left:10px solid #fc3}.mw-parser-output .ambox-move{border-left:10px solid #9932cc}.mw-parser-output .ambox-protection{border-left:10px solid #a2a9b1}.mw-parser-output .ambox .mbox-text{border:none;padding:0.25em 0.5em;width:100%}.mw-parser-output .ambox .mbox-image{border:none;padding:2px 0 2px 0.5em;text-align:center}.mw-parser-output .ambox .mbox-imageright{border:none;padding:2px 0.5em 2px 0;text-align:center}.mw-parser-output .ambox .mbox-empty-cell{border:none;padding:0;width:1px}.mw-parser-output .ambox .mbox-image-div{width:52px}@media(min-width:720px){.mw-parser-output .ambox{margin:0 10%}}@media print{body.ns-0 .mw-parser-output .ambox{display:none!important}}


/* end https://en.wikipedia.org/ */
</style>
<p>As a data type, a class is usually considered as a compile time construct.<sup id="cite_ref-43" class="reference"><a href="#cite_note-43"><span class="cite-bracket">[</span>43<span class="cite-bracket">]</span></a></sup> A language or library may also support <a href="Prototype-based_programming" title="Prototype-based programming">prototype</a> or <a href="Factory_method_pattern" title="Factory method pattern">factory</a> <a href="Metaobject" title="Metaobject">metaobjects</a> that represent runtime information about classes, or even represent metadata that provides access to <a href="Reflective_programming" title="Reflective programming">reflective programming</a> (reflection) facilities and ability to manipulate data structure formats at runtime. Many languages distinguish this kind of <a href="Run-time_type_information" title="Run-time type information">run-time type information</a> about classes from a class on the basis that the information is not needed at runtime. Some dynamic languages do not make strict distinctions between runtime and compile time constructs, and therefore may not distinguish between metaobjects and classes.
</p><p>For example, if Human is a <a href="Metaobject" title="Metaobject">metaobject</a> representing the class Person, then instances of class Person can be created by using the facilities of the Human <a href="Metaobject" title="Metaobject">metaobject</a>.
</p>
<div class="mw-heading mw-heading2"><h2 id="Prototype-based_programming">Prototype-based programming</h2></div>
<p>In contrast to creating an object from a class, some programming contexts support object creation by copying (cloning) a <a href="Prototype-based_programming" title="Prototype-based programming">prototype</a> object.<sup id="cite_ref-44" class="reference"><a href="#cite_note-44"><span class="cite-bracket">[</span>44<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading2"><h2 id="See_also">See also</h2></div>
<style data-mw-deduplicate="TemplateStyles:r1266661725">
/* start https://en.wikipedia.org/ */


.mw-parser-output .portalbox{padding:0;margin:0.5em 0;display:table;box-sizing:border-box;max-width:175px;list-style:none}.mw-parser-output .portalborder{border:1px solid var(--border-color-base,#a2a9b1);padding:0.1em;background:var(--background-color-neutral-subtle,#f8f9fa)}.mw-parser-output .portalbox-entry{display:table-row;font-size:85%;line-height:110%;height:1.9em;font-style:italic;font-weight:bold}.mw-parser-output .portalbox-image{display:table-cell;padding:0.2em;vertical-align:middle;text-align:center}.mw-parser-output .portalbox-link{display:table-cell;padding:0.2em 0.2em 0.2em 0.3em;vertical-align:middle}@media(min-width:720px){.mw-parser-output .portalleft{margin:0.5em 1em 0.5em 0}.mw-parser-output .portalright{clear:right;float:right;margin:0.5em 0 0.5em 1em}}


/* end https://en.wikipedia.org/ */
</style>
<ul><li><a href="Class_diagram" title="Class diagram">Class diagram</a>&nbsp;– Diagram that describes the static structure of a software system</li>
<li><a href="Class_variable" title="Class variable">Class variable</a>&nbsp;– Variable defined in a class whose objects all possess the same copy</li>
<li><a href="Instance_variable" title="Instance variable">Instance variable</a>&nbsp;– Member variable of a class that all its objects possess a copy of</li>
<li><a href="List_of_object-oriented_programming_languages" title="List of object-oriented programming languages">List of object-oriented programming languages</a></li>
<li><a href="Trait_(computer_programming)" title="Trait (computer programming)">Trait (computer programming)</a>&nbsp;– Set of methods that extend the functionality of a class</li></ul>
<div class="mw-heading mw-heading2"><h2 id="Notes">Notes</h2></div>
<style data-mw-deduplicate="TemplateStyles:r1239543626">
/* start https://en.wikipedia.org/ */


.mw-parser-output .reflist{margin-bottom:0.5em;list-style-type:decimal}@media screen{.mw-parser-output .reflist{font-size:90%}}.mw-parser-output .reflist .references{font-size:100%;margin-bottom:0;list-style-type:inherit}.mw-parser-output .reflist-columns-2{column-width:30em}.mw-parser-output .reflist-columns-3{column-width:25em}.mw-parser-output .reflist-columns{margin-top:0.3em}.mw-parser-output .reflist-columns ol{margin-top:0}.mw-parser-output .reflist-columns li{page-break-inside:avoid;break-inside:avoid-column}.mw-parser-output .reflist-upper-alpha{list-style-type:upper-alpha}.mw-parser-output .reflist-upper-roman{list-style-type:upper-roman}.mw-parser-output .reflist-lower-alpha{list-style-type:lower-alpha}.mw-parser-output .reflist-lower-greek{list-style-type:lower-greek}.mw-parser-output .reflist-lower-roman{list-style-type:lower-roman}


/* end https://en.wikipedia.org/ */
</style><div class="reflist reflist-lower-alpha">
</div>
<div class="reflist reflist-columns references-column-width" style="column-width: 30em;">
<ol class="references">
<li id="cite_note-FOOTNOTEGammaHelmJohnsonVlissides199514-1"><span class="mw-cite-backlink"><b><a href="#cite_ref-FOOTNOTEGammaHelmJohnsonVlissides199514_1-0">^</a></b></span> <span class="reference-text"><a href="#CITEREFGammaHelmJohnsonVlissides1995">Gamma et al. 1995</a>, p.&nbsp;14.</span>
</li>
<li id="cite_note-FOOTNOTEBruce20022.1_Objects,_classes,_and_object_types,_https://books.google.com/books?id=9NGWq3K1RwUC&amp;pg=PA18-2"><span class="mw-cite-backlink"><b><a href="#cite_ref-FOOTNOTEBruce20022.1_Objects,_classes,_and_object_types,_https://books.google.com/books?id=9NGWq3K1RwUC&amp;pg=PA18_2-0">^</a></b></span> <span class="reference-text"><a href="#CITEREFBruce2002">Bruce 2002</a>, 2.1 Objects, classes, and object types, <a rel="nofollow" class="external free" href="https://books.google.com/books?id=9NGWq3K1RwUC&amp;pg=PA18">https://books.google.com/books?id=9NGWq3K1RwUC&amp;pg=PA18</a>.</span>
</li>
<li id="cite_note-FOOTNOTEGammaHelmJohnsonVlissides199517-3"><span class="mw-cite-backlink"><b><a href="#cite_ref-FOOTNOTEGammaHelmJohnsonVlissides199517_3-0">^</a></b></span> <span class="reference-text"><a href="#CITEREFGammaHelmJohnsonVlissides1995">Gamma et al. 1995</a>, p.&nbsp;17.</span>
</li>
<li id="cite_note-pythondata_model-4"><span class="mw-cite-backlink">^ <a href="#cite_ref-pythondata_model_4-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-pythondata_model_4-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><style data-mw-deduplicate="TemplateStyles:r1238218222">
/* start https://en.wikipedia.org/ */


.mw-parser-output cite.citation{font-style:inherit;word-wrap:break-word}.mw-parser-output .citation q{quotes:"\"""\"""'""'"}.mw-parser-output .citation:target{background-color:rgba(0,127,255,0.133)}.mw-parser-output .id-lock-free.id-lock-free a{background:url("./mw/Lock-green.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-limited.id-lock-limited a,.mw-parser-output .id-lock-registration.id-lock-registration a{background:url("./mw/Lock-gray-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-subscription.id-lock-subscription a{background:url("./mw/Lock-red-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .cs1-ws-icon a{background:url("./mw/Wikisource-logo.svg")right 0.1em center/12px no-repeat}body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-free a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-limited a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-registration a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-subscription a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .cs1-ws-icon a{background-size:contain;padding:0 1em 0 0}.mw-parser-output .cs1-code{color:inherit;background:inherit;border:none;padding:inherit}.mw-parser-output .cs1-hidden-error{display:none;color:var(--color-error,#d33)}.mw-parser-output .cs1-visible-error{color:var(--color-error,#d33)}.mw-parser-output .cs1-maint{display:none;color:#085;margin-left:0.3em}.mw-parser-output .cs1-kern-left{padding-left:0.2em}.mw-parser-output .cs1-kern-right{padding-right:0.2em}.mw-parser-output .citation .mw-selflink{font-weight:inherit}@media screen{.mw-parser-output .cs1-format{font-size:95%}html.skin-theme-clientpref-night .mw-parser-output .cs1-maint{color:#18911f}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .cs1-maint{color:#18911f}}


/* end https://en.wikipedia.org/ */
</style><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://docs.python.org/reference/datamodel.html">"3. Data model"</a>. <i>The Python Language Reference</i>. Python Software Foundation<span class="reference-accessdate">. Retrieved <span class="nowrap">2012-04-26</span></span>.</cite></span>
</li>
<li id="cite_note-FOOTNOTEBooch199486-88-5"><span class="mw-cite-backlink"><b><a href="#cite_ref-FOOTNOTEBooch199486-88_5-0">^</a></b></span> <span class="reference-text"><a href="#CITEREFBooch1994">Booch 1994</a>, p.&nbsp;86-88.</span>
</li>
<li id="cite_note-6"><span class="mw-cite-backlink"><b><a href="#cite_ref-6">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://www.cplusplus.com/doc/tutorial/classes/">"Classes (I)"</a>. <i>C++ Language Tutorial</i>. cplusplus.com<span class="reference-accessdate">. Retrieved <span class="nowrap">2012-04-29</span></span>.</cite></span>
</li>
<li id="cite_note-7"><span class="mw-cite-backlink"><b><a href="#cite_ref-7">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://www.cplusplus.com/doc/tutorial/classes2/">"Classes (II)"</a>. <i>C++ Language Tutorial</i>. cplusplus.com<span class="reference-accessdate">. Retrieved <span class="nowrap">2012-04-29</span></span>.</cite></span>
</li>
<li id="cite_note-FOOTNOTEBooch1994105-8"><span class="mw-cite-backlink"><b><a href="#cite_ref-FOOTNOTEBooch1994105_8-0">^</a></b></span> <span class="reference-text"><a href="#CITEREFBooch1994">Booch 1994</a>, p.&nbsp;105.</span>
</li>
<li id="cite_note-9"><span class="mw-cite-backlink"><b><a href="#cite_ref-9">^</a></b></span> <span class="reference-text"><cite id="CITEREFParsons2015" class="citation book cs1">Parsons, June Jamrich (2015-06-22). <i>New Perspectives on Computer Concepts 2016, Comprehensive</i>. Boston, MA: Cengage Learning. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>9781305271616</bdi>. <a href="OCLC_(identifier)" class="mw-redirect" title="OCLC (identifier)">OCLC</a>&nbsp;<a rel="nofollow" class="external text" href="https://search.worldcat.org/oclc/917155105">917155105</a>.</cite></span>
</li>
<li id="cite_note-JavaAccessControl-10"><span class="mw-cite-backlink">^ <a href="#cite_ref-JavaAccessControl_10-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-JavaAccessControl_10-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://docs.oracle.com/javase/tutorial/java/javaOO/accesscontrol.html">"Controlling Access to Members of a Class"</a>. <i>The Java Tutorials</i>. Oracle<span class="reference-accessdate">. Retrieved <span class="nowrap">2012-04-19</span></span>.</cite></span>
</li>
<li id="cite_note-11"><span class="mw-cite-backlink"><b><a href="#cite_ref-11">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://web.archive.org/web/20151003162754/https://www.securecoding.cert.org/confluence/display/cplusplus/OOP08-CPP.+Do+not+return+references+to+private+data">"OOP08-CPP. Do not return references to private data"</a>. <i>CERT C++ Secure Coding Standard</i>. Carnegie Mellon University. 2010-05-10. Archived from <a rel="nofollow" class="external text" href="https://www.securecoding.cert.org/confluence/display/cplusplus/OOP08-CPP.+Do+not+return+references+to+private+data">the original</a> on 2015-10-03<span class="reference-accessdate">. Retrieved <span class="nowrap">2012-05-07</span></span>.</cite></span>
</li>
<li id="cite_note-12"><span class="mw-cite-backlink"><b><a href="#cite_ref-12">^</a></b></span> <span class="reference-text">
<cite id="CITEREFBen-Ari2007" class="citation web cs1">Ben-Ari, Mordechai (2007-01-24). <a rel="nofollow" class="external text" href="http://introcs.cs.princeton.edu/java/11cheatsheet/errors.pdf">"2.2 Identifiers"</a> <span class="cs1-format">(PDF)</span>. <i>Compile and Runtime Errors in Java</i>. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20111018094803/http://introcs.cs.princeton.edu/java/11cheatsheet/errors.pdf">Archived</a> <span class="cs1-format">(PDF)</span> from the original on 2011-10-18<span class="reference-accessdate">. Retrieved <span class="nowrap">2012-05-07</span></span>.</cite></span>
</li>
<li id="cite_note-cppinterface-13"><span class="mw-cite-backlink"><b><a href="#cite_ref-cppinterface_13-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFWild" class="citation web cs1">Wild, Fred. <a rel="nofollow" class="external text" href="http://www.drdobbs.com/cpp/184410630">"C++ Interfaces"</a>. <i>Dr. Dobb's</i>. UBM Techweb<span class="reference-accessdate">. Retrieved <span class="nowrap">2012-05-02</span></span>.</cite></span>
</li>
<li id="cite_note-14"><span class="mw-cite-backlink"><b><a href="#cite_ref-14">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://docs.ruby-lang.org/en/master/syntax/modules_and_classes_rdoc.html#label-Visibility">"modules_and_classes: Visibility"</a>.</cite></span>
</li>
<li id="cite_note-15"><span class="mw-cite-backlink"><b><a href="#cite_ref-15">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://www.cplusplus.com/doc/tutorial/inheritance/">"Friendship and inheritance"</a>. <i>C++ Language Tutorial</i>. cplusplus.com<span class="reference-accessdate">. Retrieved <span class="nowrap">2012-04-26</span></span>.</cite></span>
</li>
<li id="cite_note-16"><span class="mw-cite-backlink"><b><a href="#cite_ref-16">^</a></b></span> <span class="reference-text"><cite id="CITEREFBerfeld2008" class="citation web cs1">Berfeld, Marya (2 December 2008). <a rel="nofollow" class="external text" href="http://www.ibm.com/developerworks/rational/library/08/1202_berfeld/">"UML-to-Java transformation in IBM Rational Software Architect editions and related software"</a>. <a href="IBM" title="IBM">IBM</a><span class="reference-accessdate">. Retrieved <span class="nowrap">20 December</span> 2013</span>.</cite></span>
</li>
<li id="cite_note-17"><span class="mw-cite-backlink"><b><a href="#cite_ref-17">^</a></b></span> <span class="reference-text"><cite id="CITEREFJacobsenMagnus_ChristersonPatrik_JonssonGunnar_Overgaard1992" class="citation book cs1">Jacobsen, Ivar; Magnus Christerson; Patrik Jonsson; Gunnar Overgaard (1992). <a rel="nofollow" class="external text" href="https://archive.org/details/objectorientedso00jaco/page/43"><i>Object Oriented Software Engineering</i></a>. Addison-Wesley ACM Press. pp.&nbsp;<a rel="nofollow" class="external text" href="https://archive.org/details/objectorientedso00jaco/page/43">43–69</a>. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>0-201-54435-0</bdi>.</cite></span>
</li>
<li id="cite_note-18"><span class="mw-cite-backlink"><b><a href="#cite_ref-18">^</a></b></span> <span class="reference-text"><cite id="CITEREFKnublauchOberleTetlowWallace2006" class="citation web cs1">Knublauch, Holger; Oberle, Daniel; Tetlow, Phil; Wallace, Evan (2006-03-09). <a rel="nofollow" class="external text" href="http://www.w3.org/2001/sw/BestPractices/SE/ODSD/">"A Semantic Web Primer for Object-Oriented Software Developers"</a>. <a href="W3C" class="mw-redirect" title="W3C">W3C</a><span class="reference-accessdate">. Retrieved <span class="nowrap">2008-07-30</span></span>.</cite></span>
</li>
<li id="cite_note-19"><span class="mw-cite-backlink"><b><a href="#cite_ref-19">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://publib.boulder.ibm.com/infocenter/comphelp/v8v101/index.jsp?topic=%2Fcom.ibm.xlcpp8a.doc%2Flanguage%2Fref%2Fcplr061.htm">"Nested classes (C++ only)"</a>. <i>XL C/C++ V8.0 for AIX</i>. IBM<span class="reference-accessdate">. Retrieved <span class="nowrap">2012-05-07</span></span>.</cite></span>
</li>
<li id="cite_note-20"><span class="mw-cite-backlink"><b><a href="#cite_ref-20">^</a></b></span> <span class="reference-text">
<cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://publib.boulder.ibm.com/infocenter/comphelp/v8v101/index.jsp?topic=%2Fcom.ibm.xlcpp8a.doc%2Flanguage%2Fref%2Fcplr063.htm">"Local type names (C++ only)"</a>. <i>XL C/C++ V8.0 for AIX</i>. IBM<span class="reference-accessdate">. Retrieved <span class="nowrap">2012-05-07</span></span>.</cite></span>
</li>
<li id="cite_note-21"><span class="mw-cite-backlink"><b><a href="#cite_ref-21">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://publib.boulder.ibm.com/infocenter/comphelp/v8v101/index.jsp?topic=%2Fcom.ibm.xlcpp8a.doc%2Flanguage%2Fref%2Fcplr062.htm">"Local classes (C++ only)"</a>. <i>XL C/C++ V8.0 for AIX</i>. IBM<span class="reference-accessdate">. Retrieved <span class="nowrap">2012-05-07</span></span>.</cite></span>
</li>
<li id="cite_note-FOOTNOTEBooch1994133-134-22"><span class="mw-cite-backlink"><b><a href="#cite_ref-FOOTNOTEBooch1994133-134_22-0">^</a></b></span> <span class="reference-text"><a href="#CITEREFBooch1994">Booch 1994</a>, p.&nbsp;133-134.</span>
</li>
<li id="cite_note-23"><span class="mw-cite-backlink"><b><a href="#cite_ref-23">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://web.archive.org/web/20210224193450/http://pharo.gforge.inria.fr/PBE1/PBE1ch14.html">"13 Classes and metaclasses"</a>. <i>pharo.gforge.inria.fr</i>. Archived from <a rel="nofollow" class="external text" href="http://pharo.gforge.inria.fr/PBE1/PBE1ch14.html">the original</a> on 2021-02-24<span class="reference-accessdate">. Retrieved <span class="nowrap">2016-10-31</span></span>.</cite></span>
</li>
<li id="cite_note-24"><span class="mw-cite-backlink"><b><a href="#cite_ref-24">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://docs.ruby-lang.org/en/master/Class.html">"class Class"</a>.</cite></span>
</li>
<li id="cite_note-FOOTNOTEBooch1994134-25"><span class="mw-cite-backlink"><b><a href="#cite_ref-FOOTNOTEBooch1994134_25-0">^</a></b></span> <span class="reference-text"><a href="#CITEREFBooch1994">Booch 1994</a>, p.&nbsp;134.</span>
</li>
<li id="cite_note-26"><span class="mw-cite-backlink"><b><a href="#cite_ref-26">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://web.archive.org/web/20101115095930/http://www.alu.org/mop/concepts.html#introduction">"MOP: Concepts"</a>. <i>The Common Lisp Object System MetaObject Protocol</i>. Association of Lisp Users. Archived from <a rel="nofollow" class="external text" href="https://www.alu.org/mop/concepts.html#introduction">the original</a> on 2010-11-15<span class="reference-accessdate">. Retrieved <span class="nowrap">2012-05-08</span></span>.</cite></span>
</li>
<li id="cite_note-27"><span class="mw-cite-backlink"><b><a href="#cite_ref-27">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://msdn.microsoft.com/en-us/library/ms173149.aspx">"sealed (C# Reference)"</a>. <i>C# Reference</i>. Microsoft<span class="reference-accessdate">. Retrieved <span class="nowrap">2012-05-08</span></span>.</cite></span>
</li>
<li id="cite_note-28"><span class="mw-cite-backlink"><b><a href="#cite_ref-28">^</a></b></span> <span class="reference-text">
<cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://docs.oracle.com/javase/tutorial/java/IandI/final.html">"Writing Final Classes and Methods"</a>. <i>The Java Tutorials</i>. Oracle<span class="reference-accessdate">. Retrieved <span class="nowrap">2012-05-08</span></span>.</cite></span>
</li>
<li id="cite_note-29"><span class="mw-cite-backlink"><b><a href="#cite_ref-29">^</a></b></span> <span class="reference-text">
<cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://php.net/manual/en/language.oop5.final.php">"PHP: Final Keyword"</a>. <i>PHP Manual</i>. The PHP Group<span class="reference-accessdate">. Retrieved <span class="nowrap">2014-08-21</span></span>.</cite></span>
</li>
<li id="cite_note-30"><span class="mw-cite-backlink"><b><a href="#cite_ref-30">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://docs.oracle.com/en/java/javase/22/language/sealed-classes-and-interfaces.html">"Sealed Classes"</a>. <i>Oracle Help Center</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2025-07-07</span></span>.</cite></span>
</li>
<li id="cite_note-31"><span class="mw-cite-backlink"><b><a href="#cite_ref-31">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html">"String (Java Platform SE 7)"</a>. <i>Java Platform, Standard Edition 7: API Specification</i>. Oracle<span class="reference-accessdate">. Retrieved <span class="nowrap">2012-05-08</span></span>.</cite></span>
</li>
<li id="cite_note-32"><span class="mw-cite-backlink"><b><a href="#cite_ref-32">^</a></b></span> <span class="reference-text"><cite id="CITEREFBrand2020" class="citation web cs1">Brand, Sy (2 March 2020). <a rel="nofollow" class="external text" href="https://devblogs.microsoft.com/cppblog/the-performance-benefits-of-final-classes/">"The Performance Benefits of Final Classes"</a>. <i>Microsoft C++ team blog</i>. Microsoft<span class="reference-accessdate">. Retrieved <span class="nowrap">4 April</span> 2020</span>.</cite></span>
</li>
<li id="cite_note-33"><span class="mw-cite-backlink"><b><a href="#cite_ref-33">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://docs.python.org/3.3/tutorial/classes.html">"9. Classes"</a>. <i>The Python Tutorial</i>. Python.org<span class="reference-accessdate">. Retrieved <span class="nowrap">3 March</span> 2018</span>. <q>As is true for modules, classes partake of the dynamic nature of Python: they are created at runtime, and can be modified further after creation.</q></cite></span>
</li>
<li id="cite_note-mspartial-34"><span class="mw-cite-backlink">^ <a href="#cite_ref-mspartial_34-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-mspartial_34-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFmairawBillWagnertompratt-AQ2015" class="citation cs2">mairaw; BillWagner; tompratt-AQ (2015-09-19), <a rel="nofollow" class="external text" href="https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/partial-classes-and-methods">"Partial Classes and Methods"</a>, <i>C# Programming Guide</i>, Microsoft<span class="reference-accessdate">, retrieved <span class="nowrap">2018-08-08</span></span></cite></span>
</li>
<li id="cite_note-35"><span class="mw-cite-backlink"><b><a href="#cite_ref-35">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://learn.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/partial-classes-and-methods">"Partial Classes and Members - C#"</a>.</cite></span>
</li>
<li id="cite_note-36"><span class="mw-cite-backlink"><b><a href="#cite_ref-36">^</a></b></span> <span class="reference-text"><cite id="CITEREFBillWagner2024" class="citation web cs1">BillWagner (2024-11-14). <a rel="nofollow" class="external text" href="https://learn.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/partial-classes-and-methods">"Partial Classes and Methods - C#"</a>. <i>learn.microsoft.com</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2025-02-06</span></span>.</cite></span>
</li>
<li id="cite_note-37"><span class="mw-cite-backlink"><b><a href="#cite_ref-37">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://msdn.microsoft.com/en-us/library/79b3xss3(v=vs.100).aspx">"Static Classes and Static Class Members (C# Programming Guide)"</a>. <i>C# Programming Guide</i>. Microsoft<span class="reference-accessdate">. Retrieved <span class="nowrap">2012-05-08</span></span>.</cite></span>
</li>
<li id="cite_note-38"><span class="mw-cite-backlink"><b><a href="#cite_ref-38">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://docs.oracle.com/javase/tutorial/java/javaOO/anonymousclasses.html">"Anonymous Classes (The Java Tutorials &gt; Learning the Java Language &gt; Classes and Objects)"</a>. <i>docs.oracle.com</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2021-05-13</span></span>.</cite></span>
</li>
<li id="cite_note-39"><span class="mw-cite-backlink"><b><a href="#cite_ref-39">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://www.php.net/manual/en/language.oop5.anonymous.php">"PHP: Anonymous classes - Manual"</a>. <i>www.php.net</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2021-08-11</span></span>.</cite></span>
</li>
<li id="cite_note-40"><span class="mw-cite-backlink"><b><a href="#cite_ref-40">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://docs.oracle.com/javase/tutorial/java/concepts/object.html">"What is an Object?"</a>. <i>oracle.com</i>. Oracle Corporation<span class="reference-accessdate">. Retrieved <span class="nowrap">13 December</span> 2013</span>.</cite></span>
</li>
<li id="cite_note-41"><span class="mw-cite-backlink"><b><a href="#cite_ref-41">^</a></b></span> <span class="reference-text"><cite id="CITEREFBoochRobert_A._MaksimchukMichael_W._EngleBobbi_J._Young_Ph.D.2007" class="citation book cs1">Booch, Grady; Robert A. Maksimchuk; Michael W. Engle; Bobbi J. Young Ph.D.; Jim Conallen; Kelli A. Houston (April 30, 2007). <a rel="nofollow" class="external text" href="http://my.safaribooksonline.com/book/software-engineering-and-development/object/9780201895513"><i>Object-Oriented Analysis and Design with Applications</i></a>. Addison-Wesley Professional. pp.&nbsp;<span class="nowrap">1–</span>28. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>978-0-201-89551-3</bdi><span class="reference-accessdate">. Retrieved <span class="nowrap">20 December</span> 2013</span>. <q>There are fundamental limiting factors of human cognition; we can address these constraints through the use of decomposition, abstraction, and hierarchy.</q></cite></span>
</li>
<li id="cite_note-42"><span class="mw-cite-backlink"><b><a href="#cite_ref-42">^</a></b></span> <span class="reference-text"><cite id="CITEREFJacobsenMagnus_ChristersonPatrik_JonssonGunnar_Overgaard1992" class="citation book cs1">Jacobsen, Ivar; Magnus Christerson; Patrik Jonsson; Gunnar Overgaard (1992). <a rel="nofollow" class="external text" href="https://archive.org/details/objectorientedso00jaco"><i>Object Oriented Software Engineering</i></a>. Addison-Wesley ACM Press. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>0-201-54435-0</bdi>.</cite></span>
</li>
<li id="cite_note-43"><span class="mw-cite-backlink"><b><a href="#cite_ref-43">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/n4713.pdf">"C++ International standard"</a> <span class="cs1-format">(PDF)</span>. <i>Working Draft, Standard for Programming Language C++</i>. ISO/IEC JTC1/SC22 WG21. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20171209100334/http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2017/n4713.pdf">Archived</a> <span class="cs1-format">(PDF)</span> from the original on 2017-12-09<span class="reference-accessdate">. Retrieved <span class="nowrap">5 January</span> 2020</span>.</cite></span>
</li>
<li id="cite_note-44"><span class="mw-cite-backlink"><b><a href="#cite_ref-44">^</a></b></span> <span class="reference-text"><cite id="CITEREFAmir2023" class="citation web cs1">Amir, Masroor (25 March 2023). <a rel="nofollow" class="external text" href="https://www.thegeeksbot.com/2023/03/object-oriented-programming.html">"OOP - Object Oriented Programming - Concepts | Languages | Benefits [2023]"</a>. <i>The Geeks Bot | A Computer Science Site for geeks</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2023-04-04</span></span>.</cite></span>
</li>
</ol></div>
<div class="mw-heading mw-heading2"><h2 id="References">References</h2></div>
<style data-mw-deduplicate="TemplateStyles:r1239549316">
/* start https://en.wikipedia.org/ */


.mw-parser-output .refbegin{margin-bottom:0.5em}.mw-parser-output .refbegin-hanging-indents>ul{margin-left:0}.mw-parser-output .refbegin-hanging-indents>ul>li{margin-left:0;padding-left:3.2em;text-indent:-3.2em}.mw-parser-output .refbegin-hanging-indents ul,.mw-parser-output .refbegin-hanging-indents ul li{list-style:none}@media(max-width:720px){.mw-parser-output .refbegin-hanging-indents>ul>li{padding-left:1.6em;text-indent:-1.6em}}.mw-parser-output .refbegin-columns{margin-top:0.3em}.mw-parser-output .refbegin-columns ul{margin-top:0}.mw-parser-output .refbegin-columns li{page-break-inside:avoid;break-inside:avoid-column}@media screen{.mw-parser-output .refbegin{font-size:90%}}


/* end https://en.wikipedia.org/ */
</style><div class="refbegin" style="">
<ul><li><cite id="CITEREFBooch1994" class="citation book cs1">Booch, Grady (1994). <i>Objects and Design with Applications, Second Edition</i>. Benjamin/Cummings.</cite></li>
<li><cite id="CITEREFGammaHelmJohnsonVlissides1995" class="citation book cs1">Gamma; Helm; Johnson; Vlissides (1995). <span class="id-lock-registration" title="Free registration required"><a rel="nofollow" class="external text" href="https://archive.org/details/designpatternsel00gamm"><i>Design Patterns: Elements of Reusable Object-Oriented Software</i></a></span>. Addison Wesley. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>9780201633610</bdi>.</cite></li>
<li><cite id="CITEREFBruce2002" class="citation book cs1">Bruce, Kim B. (2002). <a rel="nofollow" class="external text" href="http://mitpress.mit.edu/books/foundations-object-oriented-languages"><i>Foundations of Object-Oriented Languages: Types and Semantics</i></a>. Cambridge, Massachusetts: MIT Press. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>978-0-262-02523-2</bdi>.</cite></li></ul>
</div>
<div class="mw-heading mw-heading2"><h2 id="Further_reading">Further reading</h2></div>
<ul><li><a rel="nofollow" class="external text" href="http://lucacardelli.name/TheoryOfObjects.html">Abadi; Cardelli: A Theory of Objects</a></li>
<li><a rel="nofollow" class="external text" href="http://www.open-std.org/jtc1/sc22/wg21/">ISO/IEC 14882:2003 Programming Language C++, International standard</a></li>
<li><a rel="nofollow" class="external text" href="http://www.laputan.org/reflection/warfare.html">Class Warfare: Classes vs. Prototypes</a>, by Brian Foote</li>
<li>Meyer, B.: "Object-oriented software construction", 2nd edition, Prentice Hall, 1997, <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>0-13-629155-4</bdi></li>
<li>Rumbaugh et al.: "Object-oriented modeling and design", Prentice Hall, 1991, <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>0-13-630054-5</bdi></li></ul>
<div class="navbox-styles"><style data-mw-deduplicate="TemplateStyles:r1129693374">
/* start https://en.wikipedia.org/ */


.mw-parser-output .hlist dl,.mw-parser-output .hlist ol,.mw-parser-output .hlist ul{margin:0;padding:0}.mw-parser-output .hlist dd,.mw-parser-output .hlist dt,.mw-parser-output .hlist li{margin:0;display:inline}.mw-parser-output .hlist.inline,.mw-parser-output .hlist.inline dl,.mw-parser-output .hlist.inline ol,.mw-parser-output .hlist.inline ul,.mw-parser-output .hlist dl dl,.mw-parser-output .hlist dl ol,.mw-parser-output .hlist dl ul,.mw-parser-output .hlist ol dl,.mw-parser-output .hlist ol ol,.mw-parser-output .hlist ol ul,.mw-parser-output .hlist ul dl,.mw-parser-output .hlist ul ol,.mw-parser-output .hlist ul ul{display:inline}.mw-parser-output .hlist .mw-empty-li{display:none}.mw-parser-output .hlist dt::after{content:": "}.mw-parser-output .hlist dd::after,.mw-parser-output .hlist li::after{content:" · ";font-weight:bold}.mw-parser-output .hlist dd:last-child::after,.mw-parser-output .hlist dt:last-child::after,.mw-parser-output .hlist li:last-child::after{content:none}.mw-parser-output .hlist dd dd:first-child::before,.mw-parser-output .hlist dd dt:first-child::before,.mw-parser-output .hlist dd li:first-child::before,.mw-parser-output .hlist dt dd:first-child::before,.mw-parser-output .hlist dt dt:first-child::before,.mw-parser-output .hlist dt li:first-child::before,.mw-parser-output .hlist li dd:first-child::before,.mw-parser-output .hlist li dt:first-child::before,.mw-parser-output .hlist li li:first-child::before{content:" (";font-weight:normal}.mw-parser-output .hlist dd dd:last-child::after,.mw-parser-output .hlist dd dt:last-child::after,.mw-parser-output .hlist dd li:last-child::after,.mw-parser-output .hlist dt dd:last-child::after,.mw-parser-output .hlist dt dt:last-child::after,.mw-parser-output .hlist dt li:last-child::after,.mw-parser-output .hlist li dd:last-child::after,.mw-parser-output .hlist li dt:last-child::after,.mw-parser-output .hlist li li:last-child::after{content:")";font-weight:normal}.mw-parser-output .hlist ol{counter-reset:listitem}.mw-parser-output .hlist ol>li{counter-increment:listitem}.mw-parser-output .hlist ol>li::before{content:" "counter(listitem)"\a0 "}.mw-parser-output .hlist dd ol>li:first-child::before,.mw-parser-output .hlist dt ol>li:first-child::before,.mw-parser-output .hlist li ol>li:first-child::before{content:" ("counter(listitem)"\a0 "}


/* end https://en.wikipedia.org/ */
</style><style data-mw-deduplicate="TemplateStyles:r1236075235">
/* start https://en.wikipedia.org/ */


.mw-parser-output .navbox{box-sizing:border-box;border:1px solid #a2a9b1;width:100%;clear:both;font-size:88%;text-align:center;padding:1px;margin:1em auto 0}.mw-parser-output .navbox .navbox{margin-top:0}.mw-parser-output .navbox+.navbox,.mw-parser-output .navbox+.navbox-styles+.navbox{margin-top:-1px}.mw-parser-output .navbox-inner,.mw-parser-output .navbox-subgroup{width:100%}.mw-parser-output .navbox-group,.mw-parser-output .navbox-title,.mw-parser-output .navbox-abovebelow{padding:0.25em 1em;line-height:1.5em;text-align:center}.mw-parser-output .navbox-group{white-space:nowrap;text-align:right}.mw-parser-output .navbox,.mw-parser-output .navbox-subgroup{background-color:#fdfdfd}.mw-parser-output .navbox-list{line-height:1.5em;border-color:#fdfdfd}.mw-parser-output .navbox-list-with-group{text-align:left;border-left-width:2px;border-left-style:solid}.mw-parser-output tr+tr>.navbox-abovebelow,.mw-parser-output tr+tr>.navbox-group,.mw-parser-output tr+tr>.navbox-image,.mw-parser-output tr+tr>.navbox-list{border-top:2px solid #fdfdfd}.mw-parser-output .navbox-title{background-color:#ccf}.mw-parser-output .navbox-abovebelow,.mw-parser-output .navbox-group,.mw-parser-output .navbox-subgroup .navbox-title{background-color:#ddf}.mw-parser-output .navbox-subgroup .navbox-group,.mw-parser-output .navbox-subgroup .navbox-abovebelow{background-color:#e6e6ff}.mw-parser-output .navbox-even{background-color:#f7f7f7}.mw-parser-output .navbox-odd{background-color:transparent}.mw-parser-output .navbox .hlist td dl,.mw-parser-output .navbox .hlist td ol,.mw-parser-output .navbox .hlist td ul,.mw-parser-output .navbox td.hlist dl,.mw-parser-output .navbox td.hlist ol,.mw-parser-output .navbox td.hlist ul{padding:0.125em 0}.mw-parser-output .navbox .navbar{display:block;font-size:100%}.mw-parser-output .navbox-title .navbar{float:left;text-align:left;margin-right:0.5em}body.skin--responsive .mw-parser-output .navbox-image img{max-width:none!important}@media print{body.ns-0 .mw-parser-output .navbox{display:none!important}}


/* end https://en.wikipedia.org/ */
</style></div><div role="navigation" class="navbox" aria-labelledby="Types_of_programming_languages107" style="padding:3px"><table class="nowraplinks mw-collapsible autocollapse navbox-inner" style="border-spacing:0;background:transparent;color:inherit"><tbody><tr><th scope="col" class="navbox-title" colspan="2"><style data-mw-deduplicate="TemplateStyles:r1239400231">
/* start https://en.wikipedia.org/ */


.mw-parser-output .navbar{display:inline;font-size:88%;font-weight:normal}.mw-parser-output .navbar-collapse{float:left;text-align:left}.mw-parser-output .navbar-boxtext{word-spacing:0}.mw-parser-output .navbar ul{display:inline-block;white-space:nowrap;line-height:inherit}.mw-parser-output .navbar-brackets::before{margin-right:-0.125em;content:"[ "}.mw-parser-output .navbar-brackets::after{margin-left:-0.125em;content:" ]"}.mw-parser-output .navbar li{word-spacing:-0.125em}.mw-parser-output .navbar a>span,.mw-parser-output .navbar a>abbr{text-decoration:inherit}.mw-parser-output .navbar-mini abbr{font-variant:small-caps;border-bottom:none;text-decoration:none;cursor:inherit}.mw-parser-output .navbar-ct-full{font-size:114%;margin:0 7em}.mw-parser-output .navbar-ct-mini{font-size:114%;margin:0 4em}html.skin-theme-clientpref-night .mw-parser-output .navbar li a abbr{color:var(--color-base)!important}@media(prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .navbar li a abbr{color:var(--color-base)!important}}@media print{.mw-parser-output .navbar{display:none!important}}


/* end https://en.wikipedia.org/ */
</style><div id="Types_of_programming_languages107" style="font-size:114%;margin:0 4em"><a href="Programming_paradigm" title="Programming paradigm">Types of programming languages</a></div></th></tr><tr><th scope="row" class="navbox-group" style="width:1%">Level</th><td class="navbox-list-with-group navbox-list navbox-odd hlist" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Machine_code" title="Machine code">Machine</a></li>
<li><a href="Assembly_language" title="Assembly language">Assembly</a></li>
<li><a href="Compiled_language" title="Compiled language">Compiled</a></li>
<li><a href="Interpreted_language" class="mw-redirect" title="Interpreted language">Interpreted</a></li></ul>
<ul><li><a href="Low-level_programming_language" title="Low-level programming language">Low-level</a></li>
<li><a href="High-level_programming_language" title="High-level programming language">High-level</a></li>
<li><a href="Very_high-level_programming_language" title="Very high-level programming language">Very high-level</a></li>
<li><a href="Esoteric_programming_language" title="Esoteric programming language">Esoteric</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="Programming_language_generations" title="Programming language generations">Generation</a></th><td class="navbox-list-with-group navbox-list navbox-even hlist" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="First-generation_programming_language" title="First-generation programming language">First</a></li>
<li><a href="Second-generation_programming_language" title="Second-generation programming language">Second</a></li>
<li><a href="Third-generation_programming_language" title="Third-generation programming language">Third</a></li>
<li><a href="Fourth-generation_programming_language" title="Fourth-generation programming language">Fourth</a></li>
<li><a href="Fifth-generation_programming_language" title="Fifth-generation programming language">Fifth</a></li></ul>
</div></td></tr></tbody></table></div>
<div class="navbox-styles"></div><div role="navigation" class="navbox" aria-labelledby="Data_types177" style="padding:3px"><table class="nowraplinks hlist mw-collapsible autocollapse navbox-inner" style="border-spacing:0;background:transparent;color:inherit"><tbody><tr><th scope="col" class="navbox-title" colspan="2"><div id="Data_types177" style="font-size:114%;margin:0 4em"><a href="Data_type" title="Data type">Data types</a></div></th></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="Units_of_information" title="Units of information">Uninterpreted</a></th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Bit" title="Bit">Bit</a></li>
<li><a href="Byte" title="Byte">Byte</a></li>
<li><a href="Ternary_numeral_system" title="Ternary numeral system">Trit</a></li>
<li><a href="Ternary_numeral_system#Tryte" title="Ternary numeral system">Tryte</a></li>
<li><a href="Word_(computer_architecture)" title="Word (computer architecture)">Word</a></li>
<li><a href="Bit_array" title="Bit array">Bit array</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">Numeric</th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Arbitrary-precision_arithmetic" title="Arbitrary-precision arithmetic">Arbitrary-precision or bignum</a></li>
<li><a href="Complex_data_type" title="Complex data type">Complex</a></li>
<li><a href="Decimal_data_type" title="Decimal data type">Decimal</a></li>
<li><a href="Fixed-point_arithmetic" title="Fixed-point arithmetic">Fixed point</a></li>
<li><a href="Block_floating_point" title="Block floating point">Block floating point</a></li>
<li><a href="Floating-point_arithmetic" title="Floating-point arithmetic">Floating point</a>
<ul><li>Reduced precision
<ul><li><a href="Minifloat" title="Minifloat">Minifloat</a></li>
<li><a href="Half-precision_floating-point_format" title="Half-precision floating-point format">Half precision</a></li>
<li><a href="Bfloat16_floating-point_format" title="Bfloat16 floating-point format">bfloat16</a></li></ul></li>
<li><a href="Single-precision_floating-point_format" title="Single-precision floating-point format">Single precision</a></li>
<li><a href="Double-precision_floating-point_format" title="Double-precision floating-point format">Double precision</a></li>
<li><a href="Quadruple-precision_floating-point_format" title="Quadruple-precision floating-point format">Quadruple precision</a></li>
<li><a href="Octuple-precision_floating-point_format" title="Octuple-precision floating-point format">Octuple precision</a></li>
<li><a href="Extended_precision" title="Extended precision">Extended precision</a>
<ul><li><a href="Long_double" title="Long double">Long double</a></li></ul></li></ul></li>
<li><a href="Integer_(computer_science)" title="Integer (computer science)">Integer</a>
<ul><li><a href="Signedness" title="Signedness">signedness</a></li></ul></li>
<li><a href="Interval_arithmetic#Implementations" title="Interval arithmetic">Interval</a></li>
<li><a href="Rational_data_type" title="Rational data type">Rational</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="Pointer_(computer_programming)" title="Pointer (computer programming)">Pointer</a></th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Memory_address" title="Memory address">Address</a>
<ul><li><a href="Physical_address" title="Physical address">physical</a></li>
<li><a href="Virtual_address_space" title="Virtual address space">virtual</a></li></ul></li>
<li><a href="Reference_(computer_science)" title="Reference (computer science)">Reference</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="Plain_text" title="Plain text">Text</a></th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Character_(computing)" title="Character (computing)">Character</a></li>
<li><a href="String_(computer_science)" title="String (computer science)">String</a>
<ul><li><a href="Null-terminated_string" title="Null-terminated string">null-terminated</a></li></ul></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="Composite_data_type" title="Composite data type">Composite</a></th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Algebraic_data_type" title="Algebraic data type">Algebraic data type</a>
<ul><li><a href="Generalized_algebraic_data_type" title="Generalized algebraic data type">generalized</a></li></ul></li>
<li><a href="Array_(data_type)" title="Array (data type)">Array</a></li>
<li><a href="Associative_array" title="Associative array">Associative array</a></li>

<li><a href="Dependent_type" title="Dependent type">Dependent</a></li>
<li><a href="Intuitionistic_type_theory#Equality_type" title="Intuitionistic type theory">Equality</a></li>
<li><a href="Inductive_type" title="Inductive type">Inductive</a></li>
<li><a href="Intersection_type" title="Intersection type">Intersection</a></li>
<li><a href="List_(abstract_data_type)" title="List (abstract data type)">List</a></li>
<li><a href="Object_(computer_science)" title="Object (computer science)">Object</a>
<ul><li><a href="Metaobject" title="Metaobject">metaobject</a></li></ul></li>
<li><a href="Option_type" title="Option type">Option type</a></li>
<li><a href="Product_type" title="Product type">Product</a></li>
<li><a href="Record_(computer_science)" title="Record (computer science)">Record or Struct</a></li>
<li><a href="Refinement_type" title="Refinement type">Refinement</a></li>
<li><a href="Set_(abstract_data_type)" title="Set (abstract data type)">Set</a></li>
<li><a href="Union_type" title="Union type">Union</a>
<ul><li><a href="Tagged_union" title="Tagged union">tagged</a></li></ul></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">Other</th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Boolean_data_type" title="Boolean data type">Boolean</a></li>
<li><a href="Bottom_type" title="Bottom type">Bottom type</a></li>
<li><a href="Container_(abstract_data_type)" title="Container (abstract data type)">Collection</a></li>
<li><a href="Enumerated_type" title="Enumerated type">Enumerated type</a></li>
<li><a href="Exception_handling" title="Exception handling">Exception</a></li>
<li><a href="Function_type" title="Function type">Function type</a></li>
<li><a href="Opaque_data_type" title="Opaque data type">Opaque data type</a></li>
<li><a href="Recursive_data_type" title="Recursive data type">Recursive data type</a></li>
<li><a href="Semaphore_(programming)" title="Semaphore (programming)">Semaphore</a></li>
<li><a href="Stream_(computing)" title="Stream (computing)">Stream</a></li>
<li><a href="Strongly_typed_identifier" title="Strongly typed identifier">Strongly typed identifier</a></li>
<li><a href="Top_type" class="mw-redirect" title="Top type">Top type</a></li>
<li><a href="Type_class" title="Type class">Type class</a></li>
<li><a href="Empty_type" title="Empty type">Empty type</a></li>
<li><a href="Unit_type" title="Unit type">Unit type</a></li>
<li><a href="Void_type" title="Void type">Void</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">Related<br>topics</th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Abstract_data_type" title="Abstract data type">Abstract data type</a></li>
<li><a href="Boxing_(computer_programming)" title="Boxing (computer programming)">Boxing</a></li>
<li><a href="Data_structure" title="Data structure">Data structure</a></li>
<li><a href="Generic_programming" title="Generic programming">Generic</a></li>
<li><a href="Kind_(type_theory)" title="Kind (type theory)">Kind</a>
<ul><li><a href="Metaclass" title="Metaclass">metaclass</a></li></ul></li>
<li><a href="Parametric_polymorphism" title="Parametric polymorphism">Parametric polymorphism</a></li>
<li><a href="Primitive_data_type" title="Primitive data type">Primitive data type</a></li>
<li><a href="Interface_(object-oriented_programming)" title="Interface (object-oriented programming)">Interface</a></li>
<li><a href="Subtyping" title="Subtyping">Subtyping</a></li>
<li><a href="Type_constructor" title="Type constructor">Type constructor</a></li>
<li><a href="Type_conversion" title="Type conversion">Type conversion</a></li>
<li><a href="Type_system" title="Type system">Type system</a></li>
<li><a href="Type_theory" title="Type theory">Type theory</a></li>
<li><a href="Variable_(computer_science)" title="Variable (computer science)">Variable</a></li></ul>
</div></td></tr></tbody></table></div></div><!--htdig_noindex--><div><div class="zim-footer">
This article is issued from <a class="external text" title="Last edited on 2025-07-27" href="https://en.wikipedia.org/wiki/?title=Class_(computer_programming)&amp;oldid=1302769863">Wikipedia</a>. The text is available under <a class="external text" href="https://creativecommons.org/licenses/by-sa/4.0/deed.en">Creative Commons Attribution-Share Alike 4.0</a> unless otherwise noted. Additional terms may apply for the media files.
</div>
</div><!--/htdig_noindex--></div>
</div>
</main>
</div>
</div>
</div>

</body></html>